package pojo.users;

import dao.Logindao;
import uilt.Scan;

public class Login {

	public boolean tologin(){  System.out.println("******欢迎登录******");

       Logindao lgdao=new Logindao();
		String username;
		boolean flge=false;
		String password;
		System.out.print("请输入账号：");
		username=Scan.getString();
		System.out.print("请输入密码：");
		password=Scan.getString();
		try {
			User user=lgdao.logingetinfo(username,password);
			if(!user.getUsername().equals("NULL")){
				flge=true;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flge;
	}

}
